package cn.wolfcode.crm.query;

import cn.wolfcode.crm.util.DateUtil;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

@Getter
@Setter
@NoArgsConstructor
public class SaleChartObjectQuery extends ObjectQuery {

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    private Long productId = -1L;
    private Long organizationId = -1L;

    private String groupType="e.username";

//    public Date getEndDate(){
//        if (endDate!=null){
//            return DateUtil.getEndDate(endDate);
//        }else {
//            return null;
//        }
//
//    }
}
